package com.zhongwang.mms.module.buy.controller;

import com.zhongwang.mms.base.BaseController;
import com.zhongwang.mms.common.JsonResult;
import com.zhongwang.mms.gen.entity.BReportPlanChange;
import com.zhongwang.mms.module.buy.service.BuyChangeQueryService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.ResponseBody;

import javax.xml.ws.Action;

/**********************************************
 * @title: BuyChangeQuery
 * @description: 提报计划变更查询
 * @author: 徐一贺
 * @date: 2020/9/18 16:24
 * @versron: ver 1.0
 **********************************************
 */
@Controller
@RequestMapping("plan/changeQuery")
public class BuyChangeQueryController extends BaseController {

    @Autowired
    private BuyChangeQueryService service;

    /**********************************************
     * @title: page
     * @description: 跳转到提报计划变更查询页面
     * @param:
     * @return:
     * @author: 徐一贺
     * @date: 2020/9/18 16:25
     * @versron: ver 1.0
     **********************************************
     */
    @GetMapping
    public String page(){
        return "buy/reportPlanQuery/page";
    }


    /**********************************************
     * @title: list
     * @description: 获取提报计划表更查询列表
     * @param:
     * @return:
     * @author: 徐一贺
     * @date: 2020/9/18 17:00
     * @versron: ver 1.0
     **********************************************
     */
    @ResponseBody
    @PostMapping("/list")
    public JsonResult list(BReportPlanChange param){
        startPage();
        return jsonResult(service.list(param));
    }
}
